import Vue from 'vue'
import VueRouter from 'vue-router'

const History = () => import('@/views/History/HistoryNews.vue')
const HomeView = () => import('@/views/Home/HomeView.vue')
const MarkDay = () => import('@/views/MarkDay/MarkDay.vue')
const Menu = () => import('@/views/Menu/Menu.vue')
const AddTime = () => import('@/views/Menu/AddTime.vue')

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    redirect: "/markday"
  },
  {
    path: '/home',
    name: 'home',
    component: HomeView
  },
  {
    path: '/markday',
    name: 'markday',
    component: MarkDay
  },
  {
    path: '/history',
    name: 'history',
    component: History
  },
  {
    path: '/menu',
    name: 'menu',
    component: Menu,
    children: [
      {
        path: 'addtime',
        name: 'addtime',
        component: AddTime
      },
    ]
  },

]

const router = new VueRouter({
  routes
})

export default router
